
<html>
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<script src="../../js/vue.js"></script>
<script src="../../js/axios-0.18.0.js"></script>
<body>
<div id="app">
<form action="http://localhost:8080/login/finget" method="post">
    <input type="hidden"  name="bid" v-model="info.bid"/><br />
    <label>书籍名</label>
    <input type="text"  name="name" v-model="info.name"/><br />
    <label>书籍号</label >
    <input type="text" name="card" v-model="info.card"/><br />
    <label>作者</label>
    <input type="text" name="author" v-model="info.author"/><br />
    <label>数量</label>
    <input type="text" name="num" v-model="info.num"/><br />
    <label>出版社</label>
    <input type="text" name="press" v-model="info.press"/><br />
    <label>分类类型</label>
    <input type="text" name="type" v-model="info.type"/><br />
    <label>状态</label>
    <input type="text" name="status" v-model="info.status"/><br />
    <input type="submit" value="确认修改" />
    <input type="button" value="取消" @click="cancel">
</form>
</div>

</body>
<script>
    var url=window.location.search;
    var parame=url.split("=");
    var bid=parame[1];
    new Vue({

        el: "#app",
        data: {
            info: ""
        },
        methods: {          //事件方法
            cancel() {
                window.history.back();
            }
        },
        mounted() {

            var _this = this;
            axios({
                method: "get",
                url: "http://localhost:8080/login/corss?bid=" + bid
            }).then(function (resp) {
                _this.info = resp.data;
            })
        }
    })

</script>
</html>